Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of notebooks in documentation #425

Merged
merged 28 commits into from
Feb 7, 2023
Merged

Improve handling of notebooks in documentation #425

merged 28 commits into from
Feb 7, 2023

Conversation

baharcos
Copy link
Member

@baharcos baharcos commented Jan 17, 2023

This PR changes the handling of notebooks in documentation from nbsphinx to myst-nb.

  • up-to-date/maintained better
  • option to force the execution of notebooks without needing to delete the outputs
  • option to exclude some notebooks from the forced execution
  • adjustable maximum cell execution time

Current caveats:

  • the download feature of the notebooks is lost but potentially can be reintroduced
  • it has to be manually checked whether the notebook cells run without errors

Jax is used as the example case:
developer notes
readthedocs.yml
configuration
requirements

@baharcos baharcos self-assigned this Jan 17, 2023
@baharcos baharcos linked an issue Jan 17, 2023 that may be closed by this pull request
3 tasks
@baharcos baharcos changed the title Improve handling of notebooks in documentation (closes #422) Improve handling of notebooks in documentation Jan 17, 2023
@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Merging #425 (78ae2f0) into main (66ac796) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #425      +/-   ##
==========================================
+ Coverage   92.84%   92.87%   +0.02%     
==========================================
  Files         231      231              
  Lines       17590    17590              
==========================================
+ Hits        16332    16337       +5     
+ Misses       1258     1253       -5     
Impacted Files Coverage Δ
src/estimagic/optimization/subsolvers/bntr.py 86.77% <0.00%> (+0.38%) ⬆️
src/estimagic/optimization/subsolvers/_trsbox.py 85.77% <0.00%> (+0.81%) ⬆️
src/estimagic/__init__.py 100.00% <0.00%> (+8.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@baharcos baharcos removed their assignment Jan 17, 2023
@baharcos
Copy link
Member Author

baharcos commented Jan 24, 2023

The latex rendering is not working properly in this notebook even when it's not executed while building and I couldn't fix.
@janosg Do you know how to have
from IPython.core.display import HTML, Latex
from IPython.display import IFrame
in the rtd_environment (ipython is already in the rtd_environment)?

@baharcos baharcos requested a review from janosg January 24, 2023 16:41
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Member

@janosg janosg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@janosg janosg merged commit 74c292b into main Feb 7, 2023
@janosg janosg deleted the nb-docs branch February 7, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve handling of notebooks in documentation
2 participants